package com.retoc.oawx.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.retoc.oawx.domain.Materials;
import com.retoc.oawx.domain.MaterialsType;
import com.retoc.oawx.service.MaterialsService;
import com.retoc.oawx.mapper.MaterialsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
* @author retoc
* @description 针对表【tb_materials】的数据库操作Service实现
* @createDate 2022-06-22 10:29:27
*/
@Service
public class MaterialsServiceImpl extends ServiceImpl<MaterialsMapper, Materials>
    implements MaterialsService{

    @Autowired
    MaterialsMapper materialsMapper;

    @Override
    public Materials selectCarByid(int id) {
        return materialsMapper.selectCarByid(id);
    }

    @Override
    public ArrayList<MaterialsType> getType() {
        return materialsMapper.getType();
    }

    @Override
    public ArrayList<Materials> selectMaterials(int typeId,int length,int start) {
        return materialsMapper.selectMaterials(typeId,length,start);
    }

    @Override
    public int insertMaterials(Materials materials) {
        return materialsMapper.insertMaterials(materials);
    }

    @Override
    public int updateMaterials(Materials materials) {
        return materialsMapper.updateMaterials(materials);
    }

    @Override
    public Materials selectMaterialsByid(int id) {
        return materialsMapper.selectMaterialsByid(id);
    }
}




